package com.temp.demo;

import java.util.ArrayList;
import java.util.Scanner;

public class Student {
    String name;
    String age;
    String gender;
    String score;
    public Student(String name, String age, String gender, String score) {
        this.name = name;
        this.age = age;
        this.gender = gender;
        this.score=score;
    }
    public Student() {
//        System.out.println("没有传入参数");
    }
    public void start(){
        Scanner sc = new Scanner(System.in);
        ArrayList<Student> students = new ArrayList<>();
        System.out.println("请定义需要录入信息的学生数量");
        int num = sc.nextInt();

        for (int i = 0; i < num; i++) {
            Student student = new Student();
            System.out.println("====欢迎使用学生成绩管理系统====");
            System.out.println("请依次输入姓名，年龄，性别，分数");
            student.name= sc.next();
//            System.out.println("请输入年龄");
            student.age=sc.next();
//            System.out.println("请输入性别");
            student.gender= sc.next();
//            System.out.println("请输入分数");
            student.score= String.valueOf(sc.nextDouble());

            System.out.println(student.name+student.age+student.gender+student.score);
        }
    }

}
